package org.xiaojinlong.file;

import java.io.*;

/**
 * @author Jin Long
 *         2016/5/23
 */
public class Test {
    public static void main(String[] args) throws IOException {
        File file = new File("C:\\Sycamore\\Git\\ThinkingInJavaReading\\src\\test.txt");
        FileInputStream s1 = new FileInputStream(file);
        FileInputStream s2 = new FileInputStream(file);
        BufferedInputStream s3 = new BufferedInputStream(s1);
        FileReader r1 = new FileReader(file);

        int a, b;
        while ((a = s1.read()) != -1 && (b = r1.read()) != -1) {
            System.out.println((char) a);
            System.out.println((char) b);
        }
    }
}
